package com.gugee.ins.common.dal.service.blogger;


import com.baomidou.mybatisplus.extension.service.IService;
import com.gugee.ins.common.dto.RateData;
import com.gugee.ins.common.model.mysql.blogger.InsRelBloggerActiveFollower;

import java.util.List;

/**
 * InsRelBloggerActiveFollowerDao
 * @author Huangxin
 */
public interface InsRelBloggerActiveFollowerDao extends IService<InsRelBloggerActiveFollower> {
    /**
     * 根据评论表信息批量插入
     * @param uid
     * @param insCommentCollectActiveFollowerCount
     * @return
     */
    void batchInsertByUid(long uid,int insCommentCollectActiveFollowerCount);

    /**
     * 删除博主的活跃粉丝关系信息
     * @param uid
     */
    void deleteByUid(long uid);

    int countByUidForAge(long uid);

    int countByUidForLanguage(long uid);

    int countByUidForNation(long uid);

    List<RateData> findActiveFollowerCategoryRateByUid(long uid, int limit);

    List<RateData> findActiveFollowerGroupByUid(long uid, int limit);


    /**
     * 统计年龄范围
     * @param uid
     * @param beginAge
     * @param endAge
     * @return
     */
    long countAgeRangeByUid(long uid,Integer beginAge,Integer endAge);

    /**
     * 年龄范围性别统计
     * @param uid
     * @param gender
     * @return
     */
    long countGenderByUid(long uid, Integer gender,Integer beginAge,Integer endAge);
}
